{%extends '../base/base.tpl'%}

{%block 'title'%}运营管理-红包{%/block%}

{%block 'header_css'%}
<link href="../../static/js/common/plugins/chosen/chosen.css?__inline" rel="stylesheet">
<link href="../../static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="../../static/css/animate.min.css" rel="stylesheet"> 
<link href="../../static/css/style.min.css?__inline" rel="stylesheet">
<link href="../../static/css/common.css?__inline" rel="stylesheet">
    <style type="text/css">
        table{font-size:13px;text-align:center;}
        thead{font-weight:bold;text-align:center;}
        th{text-align: center;}
        .list_edit_table{}
    .is_must{line-height: 34px;}
    table a{display: inline-block;}
    </style>
{%/block%}

{%block 'header_js'%}   

{%/block%}

{%block 'foot'%}

{%/block%}

{%block 'body'%}
{%assign var=table_operation value="true" %}
{%assign var=table_btn value=array(
  [
    'url'=>'#',
    'text'=>'编辑',
    'type'=>'edit_btn',
    'data_target'=>'#table_detail',
    'data_toggle'=>'modal'
  ],
  [
    'url'=>'#',
    'text'=>'详情',
    'type'=>'detail_btn',
    'data_target'=>'#table_detail',
    'data_toggle'=>'modal'
  ],
  [
    'url'=>'#',
    'text'=>'删除',
    'type'=>'del_btn',
    'data_target'=>'null',
    'data_toggle'=>'null'
  ]
) %}
    <div id="wrapper">
        {%include file="../../widget/left_menu.tpl"%}
        <div id="page-wrapper" class="gray-bg dashbard-1">
        {%include file="../../widget/header.tpl"%}
        <div class="row J_mainContent" id="content-main">
            
            <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h3>banner管理</h3>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <form method="get" class="form-horizontal">
                                <div class="form-group">
                                    <div class="col-sm-6">
                                        <label class="col-sm-3 control-label">banner 类型:</label>
                                        <div class="col-md-9" id="share_banner_type">
                                            <div class="radio i-checks col-md-4">
                                                <label class="">
                                                    <div class="iradio_square-green"><input type="radio" value="0" id='id_banner_type_wx' name="banner_type"></div> <i></i> 微信</label>
                                            </div>
                                            <div class="radio i-checks col-md-4">
                                                <label class="">
                                                    <div class="iradio_square-green"><input type="radio" value="1" id='id_banner_type_app'  name="banner_type"></div> <i></i> app</label>
                                            </div>
                                            <div class="radio i-checks col-md-4">
                                                <label class="">
                                                    <div class="iradio_square-green"><input type="radio" value="2" id='id_banner_type_all'  name="banner_type"></div> <i></i> 通用</label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <label class="col-sm-5 control-label">使用场景 :</label>
                                        <div class="col-md-7" id="share_target_type">
                                            <div class="radio i-checks col-md-6">
                                                <label class="">
                                                    <div class="iradio_square-green"><input type="radio" value="0" id='id_target_type_index' name="target_type"></div> <i></i> 首页</label>
                                            </div>
                                            <div class="radio i-checks col-md-6">
                                                <label class="">
                                                    <div class="iradio_square-green"><input type="radio" value="1" id='id_target_type_entity'  name="target_type"></div> <i></i> 实体商品</label>
                                            </div>
                                        </div>
                                    </div>
                                    
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-4 pull-right">
                                        <label class="col-sm-3 control-label"></label>
                                        <div class="col-md-9" id="regionWrap">
                                            <button class="btn btn-primary pull-right"  type="submit"><i class="fa fa-search"></i>&nbsp;搜索</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <a type="button" href="#" class="btn btn-primary new_file_coupon" data-toggle="modal" data-target="#table_detail">创建banner</a>

                          {%include file="../../widget/table_mod.tpl"%}
                          {%include file="../../widget/pagination.tpl"%}

                    </div>
                </div>
        </div>
        {%include file="../../widget/footer.tpl"%}
        </div>
    </div>
    {%include file="../../widget/editable_mod.tpl"%}
{%/block%}
    
{%block 'foot_js'%}
<script src="../../static/js/common/plugins/chosen/chosen.jquery.js?__inline"></script>
<script src="../../static/js/common/content.min.js"></script>
<script src="../../static/js/common/plugins/validate/jquery.validate.min.js"></script>
<script src="../../static/js/common/plugins/validate/messages_zh.min.js"></script>
<script src="../../static/js/common/jquery.form.js"></script>
<script src="../../static/js/common/plugins/layer/laydate/laydate.js"></script> 
<script src="../../static/js/common/plugins/sweetalert/sweetalert.min.js"></script>
<script src="../../static/js/common/plugins/jeditable/jquery.jeditable.js"></script> 
<script src="../../static/js/common/plugins/dataTables/jquery.dataTables.js"></script> 
<script src="../../static/js/common/plugins/dataTables/dataTables.bootstrap.js"></script> 
<script src="../../static/js/common/plugins/iCheck/icheck.min.js"></script> 
<script src="../../static/js/common/plugins/cropper/cropper.min.js"></script> 
<script src="../../static/js/common/plugins/ajaxfileupload/ajaxfileupload.js"></script> 

<!-- 上传组件 -->
<script src="../../static/js/common/plugins/fileinput/fileinput.min.js"></script>
<script src="../../static/js/common/plugins/fileinput/fileinput_locale_zh.js"></script>
<!-- 富文本 -->
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="../../static/js/common/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- <script src="../../static/js/table/tableoperation.js"></script> -->
<script src="../../static/js/searchfordate/script.js?__inline"></script> <!--搜索条件的时间调用函数-->
<script src="../../static/js/table/tableModel.js"></script>
<script type="text/javascript">
$(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    
var WinUrl = window.location.search;
 


var customFun = {
    
    
  
};
common_option = customFun;
function getUrlParam(name){   //获取URL参数值
    //构造一个含有目标参数的正则表达式对象  
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");  
    //匹配目标参数  
    var r = decodeURI(window.location.search.substr(1)).match(reg);  
    //返回参数值  
    if (r!=null) return unescape(r[2]);  
    return null;  
}
$(function(){
    if(WinUrl.indexOf("banner_type") > 0){
        // alert("aaaa");
        // $("#share_share_status input[value='share_status']").val(getUrlParam('share_status'));
        if(getUrlParam('banner_type')==0){
            $('#id_banner_type_wx').attr('checked',true);
            $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})
        }else if(getUrlParam('banner_type')==1){
            $('#id_banner_type_app').attr('checked',true);
            $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})
        }else if(getUrlParam('banner_type')==2){
            $('#id_banner_type_all').attr('checked',true);
            $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})
        }
        
    }
    if(WinUrl.indexOf("target_type") > 0){
        if(getUrlParam('target_type')==0){
            $('#id_target_type_index').attr('checked',true);
            $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})
        }else if(getUrlParam('banner_type')==1){
            $('#id_target_type_entity').attr('checked',true);
            $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})
        }
    }
});
  

 
  
    
  

  

  
    
    
  


 

</script> 
{%/block%}
